<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: XilSecure AES Server APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xsecure__aes__server__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilSecure AES Server APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaf7e4e23831da01fbb569d0bd5ec53edd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaf7e4e23831da01fbb569d0bd5ec53edd">XSECURE_KEK_DEC_ENABLE</a>&#160;&#160;&#160;(0x1U)</td></tr>
<tr class="memdesc:gaf7e4e23831da01fbb569d0bd5ec53edd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Triggers decryption operation for black key.  <a href="#gaf7e4e23831da01fbb569d0bd5ec53edd">More...</a><br/></td></tr>
<tr class="separator:gaf7e4e23831da01fbb569d0bd5ec53edd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8adde1345ce8edcaec86ff8d9898af06"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga8adde1345ce8edcaec86ff8d9898af06">XSECURE_AES_DISABLE_KUP_IV_UPDATE</a>&#160;&#160;&#160;(0x0U)</td></tr>
<tr class="memdesc:ga8adde1345ce8edcaec86ff8d9898af06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables IV and Key save features for KUP.  <a href="#ga8adde1345ce8edcaec86ff8d9898af06">More...</a><br/></td></tr>
<tr class="separator:ga8adde1345ce8edcaec86ff8d9898af06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1355e094199d737cb60c443a8128a825"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga1355e094199d737cb60c443a8128a825">XSECURE_AES_ENABLE_KUP_IV_UPDATE</a>&#160;&#160;&#160;(0x1U)</td></tr>
<tr class="memdesc:ga1355e094199d737cb60c443a8128a825"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables IV and Key save features for KUP.  <a href="#ga1355e094199d737cb60c443a8128a825">More...</a><br/></td></tr>
<tr class="separator:ga1355e094199d737cb60c443a8128a825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41242ae2169986d4a05c94e659561e51"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga41242ae2169986d4a05c94e659561e51">XSECURE_AES_AAD_ENABLE</a>&#160;&#160;&#160;(0x1U)</td></tr>
<tr class="memdesc:ga41242ae2169986d4a05c94e659561e51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables authentication of data pushed in AES engine.  <a href="#ga41242ae2169986d4a05c94e659561e51">More...</a><br/></td></tr>
<tr class="separator:ga41242ae2169986d4a05c94e659561e51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9944c3af466f03239bab724adc5cf8f5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga9944c3af466f03239bab724adc5cf8f5">XSECURE_AES_AAD_DISABLE</a>&#160;&#160;&#160;(0x0U)</td></tr>
<tr class="memdesc:ga9944c3af466f03239bab724adc5cf8f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables authentication of data pushed in AES engine.  <a href="#ga9944c3af466f03239bab724adc5cf8f5">More...</a><br/></td></tr>
<tr class="separator:ga9944c3af466f03239bab724adc5cf8f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ef6c422dedc24716a5cd91892304134"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga6ef6c422dedc24716a5cd91892304134">XSECURE_AES_DEC_KEY_SRC_MASK</a>&#160;&#160;&#160;(0x000000FFU)</td></tr>
<tr class="memdesc:ga6ef6c422dedc24716a5cd91892304134"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES decrypt key source mask for KEK decryption.  <a href="#ga6ef6c422dedc24716a5cd91892304134">More...</a><br/></td></tr>
<tr class="separator:ga6ef6c422dedc24716a5cd91892304134"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4824f991f48dd7050a69598367dfb093"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga4824f991f48dd7050a69598367dfb093">XSECURE_AES_DST_KEY_SRC_MASK</a>&#160;&#160;&#160;(0x0000FF00U)</td></tr>
<tr class="memdesc:ga4824f991f48dd7050a69598367dfb093"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES destination key source mask for KEK decryption.  <a href="#ga4824f991f48dd7050a69598367dfb093">More...</a><br/></td></tr>
<tr class="separator:ga4824f991f48dd7050a69598367dfb093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d5a472989742f1f1f53e87597e33b3f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga4d5a472989742f1f1f53e87597e33b3f">XSECURE_AES_KEY_SIZE_MASK</a>&#160;&#160;&#160;(0xFFFF0000U)</td></tr>
<tr class="memdesc:ga4d5a472989742f1f1f53e87597e33b3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Key Size mask.  <a href="#ga4d5a472989742f1f1f53e87597e33b3f">More...</a><br/></td></tr>
<tr class="separator:ga4d5a472989742f1f1f53e87597e33b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb041a8728c54e97cdc310326006af0a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gafb041a8728c54e97cdc310326006af0a">XSECURE_PMCDMA_DEVICEID</a>&#160;&#160;&#160;(PMCDMA_0_DEVICE_ID)</td></tr>
<tr class="memdesc:gafb041a8728c54e97cdc310326006af0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES destination key source mask for KEK decryption.  <a href="#gafb041a8728c54e97cdc310326006af0a">More...</a><br/></td></tr>
<tr class="separator:gafb041a8728c54e97cdc310326006af0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7eec200e8b013181f73f91c773195844"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga7eec200e8b013181f73f91c773195844">XSECURE_AES_KEY_WRAP_MAX_ROUNDS</a>&#160;&#160;&#160;(5U)</td></tr>
<tr class="memdesc:ga7eec200e8b013181f73f91c773195844"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES key wrap maximum rounds.  <a href="#ga7eec200e8b013181f73f91c773195844">More...</a><br/></td></tr>
<tr class="separator:ga7eec200e8b013181f73f91c773195844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad12e8fdc37fd38e9a10b3979b495e364"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gad12e8fdc37fd38e9a10b3979b495e364">XSECURE_AES_256BIT_MAX_KEY_BLOCK_ROUNDS</a>&#160;&#160;&#160;(4U)</td></tr>
<tr class="memdesc:gad12e8fdc37fd38e9a10b3979b495e364"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES 256-bit number of blocks.  <a href="#gad12e8fdc37fd38e9a10b3979b495e364">More...</a><br/></td></tr>
<tr class="separator:gad12e8fdc37fd38e9a10b3979b495e364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2f78b9aec19c60f8d29b4ba55f180a4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gab2f78b9aec19c60f8d29b4ba55f180a4">XSECURE_AES_128BIT_MAX_KEY_BLOCK_ROUNDS</a>&#160;&#160;&#160;(2U)</td></tr>
<tr class="memdesc:gab2f78b9aec19c60f8d29b4ba55f180a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES 128-bit number of blocks.  <a href="#gab2f78b9aec19c60f8d29b4ba55f180a4">More...</a><br/></td></tr>
<tr class="separator:gab2f78b9aec19c60f8d29b4ba55f180a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1bceb3750312b5c32f292ad571f75683"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga1bceb3750312b5c32f292ad571f75683">XSECURE_AES_KEY_WRAP_INIT_DEF_VAL</a>&#160;&#160;&#160;(0xA6A6A6A6A6A6A6A6U)</td></tr>
<tr class="memdesc:ga1bceb3750312b5c32f292ad571f75683"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES init default value.  <a href="#ga1bceb3750312b5c32f292ad571f75683">More...</a><br/></td></tr>
<tr class="separator:ga1bceb3750312b5c32f292ad571f75683"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga54f245411d6dc8248fde64c3727d0210"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga54f245411d6dc8248fde64c3727d0210">XSECURE_AES_ECB_MODE_EN</a>&#160;&#160;&#160;(1U)</td></tr>
<tr class="memdesc:ga54f245411d6dc8248fde64c3727d0210"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES ECB Mode Enable.  <a href="#ga54f245411d6dc8248fde64c3727d0210">More...</a><br/></td></tr>
<tr class="separator:ga54f245411d6dc8248fde64c3727d0210"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c335ab77abaf46efb54cdd08a16c7d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga9c335ab77abaf46efb54cdd08a16c7d6">XSECURE_AES_ECB_MODE_DIS</a>&#160;&#160;&#160;(0U)</td></tr>
<tr class="memdesc:ga9c335ab77abaf46efb54cdd08a16c7d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES ECB Mode Enable.  <a href="#ga9c335ab77abaf46efb54cdd08a16c7d6">More...</a><br/></td></tr>
<tr class="separator:ga9c335ab77abaf46efb54cdd08a16c7d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa26b61acf33b45fed961e0e3a59f7baa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaa26b61acf33b45fed961e0e3a59f7baa">XSECURE_AES_64BIT_BLOCK_SIZE</a>&#160;&#160;&#160;(8U)</td></tr>
<tr class="memdesc:gaa26b61acf33b45fed961e0e3a59f7baa"><td class="mdescLeft">&#160;</td><td class="mdescRight">AES 64-bit block size in bytes.  <a href="#gaa26b61acf33b45fed961e0e3a59f7baa">More...</a><br/></td></tr>
<tr class="separator:gaa26b61acf33b45fed961e0e3a59f7baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga55cd9d64e04cce6a57d729b67a5f0c47"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> { <a class="el" href="group__xsecure__aes__server__apis.html#gga55cd9d64e04cce6a57d729b67a5f0c47a2e5b9343d2f9cc0e355b413d6a3848e3">XSECURE_AES_KEY_SIZE_128</a> = 0,
<a class="el" href="group__xsecure__aes__server__apis.html#gga55cd9d64e04cce6a57d729b67a5f0c47afe748ecfca538040238b87ca1bd1dfde">XSECURE_AES_KEY_SIZE_256</a> = 2,
<a class="el" href="group__xsecure__aes__server__apis.html#gga55cd9d64e04cce6a57d729b67a5f0c47a2e5b9343d2f9cc0e355b413d6a3848e3">XSECURE_AES_KEY_SIZE_128</a> = 0,
<a class="el" href="group__xsecure__aes__server__apis.html#gga55cd9d64e04cce6a57d729b67a5f0c47afe748ecfca538040238b87ca1bd1dfde">XSECURE_AES_KEY_SIZE_256</a> = 2
 }</td></tr>
<tr class="memdesc:ga55cd9d64e04cce6a57d729b67a5f0c47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used for selecting the Key size of AES Core.  <a href="group__xsecure__aes__server__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">More...</a><br/></td></tr>
<tr class="separator:ga55cd9d64e04cce6a57d729b67a5f0c47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga13b13c404de0b6f918193c4b63198acc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga13b13c404de0b6f918193c4b63198acc">XSecure_AesInitialize</a> (XSecure_Aes *InstancePtr, XPmcDma *PmcDmaPtr)</td></tr>
<tr class="memdesc:ga13b13c404de0b6f918193c4b63198acc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the AES instance pointer.  <a href="#ga13b13c404de0b6f918193c4b63198acc">More...</a><br/></td></tr>
<tr class="separator:ga13b13c404de0b6f918193c4b63198acc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7009ee23d2f452bbcad0b44a7e162bc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaf7009ee23d2f452bbcad0b44a7e162bc">XSecure_AesSetDpaCm</a> (const XSecure_Aes *InstancePtr, u32 DpaCmCfg)</td></tr>
<tr class="memdesc:gaf7009ee23d2f452bbcad0b44a7e162bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function enables or disables DPA counter measures in AES engine based on user input.  <a href="#gaf7009ee23d2f452bbcad0b44a7e162bc">More...</a><br/></td></tr>
<tr class="separator:gaf7009ee23d2f452bbcad0b44a7e162bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23c59319450ef4fac730de6019d36a5a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga23c59319450ef4fac730de6019d36a5a">XSecure_AesWriteKey</a> (const XSecure_Aes *InstancePtr, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> KeySrc, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize, u64 KeyAddr)</td></tr>
<tr class="memdesc:ga23c59319450ef4fac730de6019d36a5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function writes the key provided into the specified AES key registers.  <a href="#ga23c59319450ef4fac730de6019d36a5a">More...</a><br/></td></tr>
<tr class="separator:ga23c59319450ef4fac730de6019d36a5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d71c3a289fb13edf97bdd3ac8945e39"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga1d71c3a289fb13edf97bdd3ac8945e39">XSecure_AesUpdateAad</a> (XSecure_Aes *InstancePtr, u64 AadAddr, u32 AadSize)</td></tr>
<tr class="memdesc:ga1d71c3a289fb13edf97bdd3ac8945e39"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to update the AES engine with Additional Authenticated Data(AAD).  <a href="#ga1d71c3a289fb13edf97bdd3ac8945e39">More...</a><br/></td></tr>
<tr class="separator:ga1d71c3a289fb13edf97bdd3ac8945e39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9ad11c4f580a91a007391ef94cad3fb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gad9ad11c4f580a91a007391ef94cad3fb">XSecure_AesKekDecrypt</a> (const XSecure_Aes *InstancePtr, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> DecKeySrc, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> DstKeySrc, u64 IvAddr, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize)</td></tr>
<tr class="memdesc:gad9ad11c4f580a91a007391ef94cad3fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function decrypts the KEK/obfuscated key which is found encrypted in boot header/eFUSE/BBRAM.  <a href="#gad9ad11c4f580a91a007391ef94cad3fb">More...</a><br/></td></tr>
<tr class="separator:gad9ad11c4f580a91a007391ef94cad3fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga807d06af255f6812989d18fe9e8c7cac"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga807d06af255f6812989d18fe9e8c7cac">XSecure_AesDecryptInit</a> (XSecure_Aes *InstancePtr, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> KeySrc, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize, u64 IvAddr)</td></tr>
<tr class="memdesc:ga807d06af255f6812989d18fe9e8c7cac"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the AES engine for decryption.  <a href="#ga807d06af255f6812989d18fe9e8c7cac">More...</a><br/></td></tr>
<tr class="separator:ga807d06af255f6812989d18fe9e8c7cac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c217f08493d7335e61a96faad16430c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga1c217f08493d7335e61a96faad16430c">XSecure_AesDecryptUpdate</a> (XSecure_Aes *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u8 IsLastChunk)</td></tr>
<tr class="memdesc:ga1c217f08493d7335e61a96faad16430c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to update the AES engine for decryption with provided data and stores the decrypted data at specified address.  <a href="#ga1c217f08493d7335e61a96faad16430c">More...</a><br/></td></tr>
<tr class="separator:ga1c217f08493d7335e61a96faad16430c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f1f786e7a3e95185c49a2f432b7c713"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga7f1f786e7a3e95185c49a2f432b7c713">XSecure_AesDecryptFinal</a> (XSecure_Aes *InstancePtr, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:ga7f1f786e7a3e95185c49a2f432b7c713"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function verifies the GCM tag provided for the data decrypted till the point.  <a href="#ga7f1f786e7a3e95185c49a2f432b7c713">More...</a><br/></td></tr>
<tr class="separator:ga7f1f786e7a3e95185c49a2f432b7c713"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ba70bdc53e1ee1cef9065218b53a624"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga7ba70bdc53e1ee1cef9065218b53a624">XSecure_AesDecryptData</a> (XSecure_Aes *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:ga7ba70bdc53e1ee1cef9065218b53a624"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function decrypts the size (length) number of bytes of the passed in InDataAddr (source) buffer and stores the decrypted data in the OutDataAddr (destination) buffer and verifies GcmTagAddr.  <a href="#ga7ba70bdc53e1ee1cef9065218b53a624">More...</a><br/></td></tr>
<tr class="separator:ga7ba70bdc53e1ee1cef9065218b53a624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90198a57e2ac802241f43067c6644ae0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga90198a57e2ac802241f43067c6644ae0">XSecure_AesEncryptInit</a> (XSecure_Aes *InstancePtr, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> KeySrc, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize, u64 IvAddr)</td></tr>
<tr class="memdesc:ga90198a57e2ac802241f43067c6644ae0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the AES engine for encryption.  <a href="#ga90198a57e2ac802241f43067c6644ae0">More...</a><br/></td></tr>
<tr class="separator:ga90198a57e2ac802241f43067c6644ae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc1c2624b3827e83af7c24b2906bb7db"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gafc1c2624b3827e83af7c24b2906bb7db">XSecure_AesEncryptUpdate</a> (XSecure_Aes *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u8 IsLastChunk)</td></tr>
<tr class="memdesc:gafc1c2624b3827e83af7c24b2906bb7db"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to update the AES engine for encryption with provided data and stores the decrypted data at specified address.  <a href="#gafc1c2624b3827e83af7c24b2906bb7db">More...</a><br/></td></tr>
<tr class="separator:gafc1c2624b3827e83af7c24b2906bb7db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae22634123b8e2b07d0fd2959ccb99709"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gae22634123b8e2b07d0fd2959ccb99709">XSecure_AesEncryptFinal</a> (XSecure_Aes *InstancePtr, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:gae22634123b8e2b07d0fd2959ccb99709"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function updates the GCM tag for the encrypted data.  <a href="#gae22634123b8e2b07d0fd2959ccb99709">More...</a><br/></td></tr>
<tr class="separator:gae22634123b8e2b07d0fd2959ccb99709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad76ddbc6c3c0badc06b26ebae71c38bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gad76ddbc6c3c0badc06b26ebae71c38bd">XSecure_AesEncryptData</a> (XSecure_Aes *InstancePtr, u64 InDataAddr, u64 OutDataAddr, u32 Size, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:gad76ddbc6c3c0badc06b26ebae71c38bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function encrypts size (length) number of bytes of the passed in InDataAddr (source) buffer and stores the encrypted data along with its associated 16 byte tag in the OutDataAddr (destination) buffer and GcmTagAddr (buffer) respectively.  <a href="#gad76ddbc6c3c0badc06b26ebae71c38bd">More...</a><br/></td></tr>
<tr class="separator:gad76ddbc6c3c0badc06b26ebae71c38bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf062a667c2c2204b6e15c1a5dc689dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gabf062a667c2c2204b6e15c1a5dc689dd">XSecure_AesCfgKupKeyNIv</a> (const XSecure_Aes *InstancePtr, u8 Config)</td></tr>
<tr class="memdesc:gabf062a667c2c2204b6e15c1a5dc689dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets AES engine to update key and IV during decryption of secure header or footer of encrypted partition.  <a href="#gabf062a667c2c2204b6e15c1a5dc689dd">More...</a><br/></td></tr>
<tr class="separator:gabf062a667c2c2204b6e15c1a5dc689dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62c2d78201f34ec93974d43035f71794"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga62c2d78201f34ec93974d43035f71794">XSecure_AesGetNxtBlkLen</a> (const XSecure_Aes *InstancePtr, u32 *Size)</td></tr>
<tr class="memdesc:ga62c2d78201f34ec93974d43035f71794"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function gives the AES next block length after decryption of PDI block.  <a href="#ga62c2d78201f34ec93974d43035f71794">More...</a><br/></td></tr>
<tr class="separator:ga62c2d78201f34ec93974d43035f71794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga951b41e7a8b8a9ce252cdd640f69a8dc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga951b41e7a8b8a9ce252cdd640f69a8dc">XSecure_AesKeyZero</a> (const XSecure_Aes *InstancePtr, <a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a> KeySrc)</td></tr>
<tr class="memdesc:ga951b41e7a8b8a9ce252cdd640f69a8dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function zeroizes the selected AES key storage register.  <a href="#ga951b41e7a8b8a9ce252cdd640f69a8dc">More...</a><br/></td></tr>
<tr class="separator:ga951b41e7a8b8a9ce252cdd640f69a8dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga443eef9b38401bfcbafa33a4eec6859c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga443eef9b38401bfcbafa33a4eec6859c">XSecure_AesDpaCmDecryptData</a> (const XSecure_Aes *AesInstance, const u32 *KeyPtr, const u32 *DataPtr, u32 *OutputPtr)</td></tr>
<tr class="memdesc:ga443eef9b38401bfcbafa33a4eec6859c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function updates data and key to the AES core in split mode with DPACM enabled.  <a href="#ga443eef9b38401bfcbafa33a4eec6859c">More...</a><br/></td></tr>
<tr class="separator:ga443eef9b38401bfcbafa33a4eec6859c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8adf6430b44ff6b7acf7df53a34df9b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga8adf6430b44ff6b7acf7df53a34df9b1">XSecure_AesGmacCfg</a> (XSecure_Aes *InstancePtr, u32 IsGmacEn)</td></tr>
<tr class="memdesc:ga8adf6430b44ff6b7acf7df53a34df9b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function enables or disables the GMAC configuration.  <a href="#ga8adf6430b44ff6b7acf7df53a34df9b1">More...</a><br/></td></tr>
<tr class="separator:ga8adf6430b44ff6b7acf7df53a34df9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeca8eaab9e67f642a1196aa2bc3e9492"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaeca8eaab9e67f642a1196aa2bc3e9492">XSecure_AesUpdateAadAndValidate</a> (XSecure_Aes *InstancePtr, u64 AadAddr, u32 AadSize, u64 GcmTagAddr)</td></tr>
<tr class="memdesc:gaeca8eaab9e67f642a1196aa2bc3e9492"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to update the AES engine with Additional Authenticated Data(AAD) and validate.  <a href="#gaeca8eaab9e67f642a1196aa2bc3e9492">More...</a><br/></td></tr>
<tr class="separator:gaeca8eaab9e67f642a1196aa2bc3e9492"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fcf401d8b1ccbe22d58cad54cb90178"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga5fcf401d8b1ccbe22d58cad54cb90178">XSecure_CfgSssAes</a> (XPmcDma *DmaPtr, const XSecure_Sss *SssInstance)</td></tr>
<tr class="memdesc:ga5fcf401d8b1ccbe22d58cad54cb90178"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function configures SSS to AES engine.  <a href="#ga5fcf401d8b1ccbe22d58cad54cb90178">More...</a><br/></td></tr>
<tr class="separator:ga5fcf401d8b1ccbe22d58cad54cb90178"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d0efd64b0f7ebbdc1b3be80aa10a840"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga3d0efd64b0f7ebbdc1b3be80aa10a840">XSecure_AesIpiHandler</a> (XPlmi_Cmd *Cmd)</td></tr>
<tr class="memdesc:ga3d0efd64b0f7ebbdc1b3be80aa10a840"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calls respective IPI handler based on the API_ID.  <a href="#ga3d0efd64b0f7ebbdc1b3be80aa10a840">More...</a><br/></td></tr>
<tr class="separator:ga3d0efd64b0f7ebbdc1b3be80aa10a840"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa58a05547f6ae883c23823bf0f3bed7d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaa58a05547f6ae883c23823bf0f3bed7d">XSecure_AesInit</a> (void)</td></tr>
<tr class="memdesc:gaa58a05547f6ae883c23823bf0f3bed7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function handler calls XSecure_AesInitialize Server API.  <a href="#gaa58a05547f6ae883c23823bf0f3bed7d">More...</a><br/></td></tr>
<tr class="separator:gaa58a05547f6ae883c23823bf0f3bed7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6b5414d0bffdebf14b418d2d05135faa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga6b5414d0bffdebf14b418d2d05135faa">XSecure_AesKeyZeroize</a> (u32 KeySrc)</td></tr>
<tr class="memdesc:ga6b5414d0bffdebf14b418d2d05135faa"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function handler calls XSecure_AesKeyZero server API.  <a href="#ga6b5414d0bffdebf14b418d2d05135faa">More...</a><br/></td></tr>
<tr class="separator:ga6b5414d0bffdebf14b418d2d05135faa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7f952e1399a6303328d40d8e251460c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gaa7f952e1399a6303328d40d8e251460c">XSecure_AesKeyWrite</a> (u8 KeySize, u8 KeySrc, u32 KeyAddrLow, u32 KeyAddrHigh)</td></tr>
<tr class="memdesc:gaa7f952e1399a6303328d40d8e251460c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function handler calls XSecure_AesWriteKey server API.  <a href="#gaa7f952e1399a6303328d40d8e251460c">More...</a><br/></td></tr>
<tr class="separator:gaa7f952e1399a6303328d40d8e251460c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe78befff27daa757aecc436204e33af"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#gabe78befff27daa757aecc436204e33af">XSecure_AesPerformOperation</a> (u32 SrcAddrLow, u32 SrcAddrHigh)</td></tr>
<tr class="memdesc:gabe78befff27daa757aecc436204e33af"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function handler calls XSecure_AesPerformOperation.  <a href="#gabe78befff27daa757aecc436204e33af">More...</a><br/></td></tr>
<tr class="separator:gabe78befff27daa757aecc436204e33af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42ab2048d7363ba51f6d9c4e9c93d88e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga42ab2048d7363ba51f6d9c4e9c93d88e">XSecure_AesEcbCfg</a> (XSecure_Aes *InstancePtr, u32 EcbModeFlag)</td></tr>
<tr class="memdesc:ga42ab2048d7363ba51f6d9c4e9c93d88e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function sets AES ECB mode.  <a href="#ga42ab2048d7363ba51f6d9c4e9c93d88e">More...</a><br/></td></tr>
<tr class="separator:ga42ab2048d7363ba51f6d9c4e9c93d88e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6422d39ce630dc928daba92a65da4c56"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga6422d39ce630dc928daba92a65da4c56">XSecure_AesEcbDecrypt</a> (XSecure_Aes *InstancePtr, u64 KeyAddr, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize, u64 InDataAddr, u64 OutDataAddr, u32 Size)</td></tr>
<tr class="memdesc:ga6422d39ce630dc928daba92a65da4c56"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function writes AES key into XSECURE_AES_USER_KEY_7 and decrypts the data in ECB mode.  <a href="#ga6422d39ce630dc928daba92a65da4c56">More...</a><br/></td></tr>
<tr class="separator:ga6422d39ce630dc928daba92a65da4c56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4da9ead453ef1dbeebefeebb377eb94d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap</a> (XSecure_Aes *InstancePtr, u8 *EphAesKey, <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a> KeySize, u8 *AesWrapKey, u64 OutDataAddr, u32 Size)</td></tr>
<tr class="memdesc:ga4da9ead453ef1dbeebefeebb377eb94d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function unwraps the given AES wrapped key.  <a href="#ga4da9ead453ef1dbeebefeebb377eb94d">More...</a><br/></td></tr>
<tr class="separator:ga4da9ead453ef1dbeebefeebb377eb94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1471a9dc9965ae80577a09aadafeeb53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__aes__server__apis.html#ga1471a9dc9965ae80577a09aadafeeb53">XSecure_PlatAesIpiHandler</a> (XPlmi_Cmd *Cmd)</td></tr>
<tr class="memdesc:ga1471a9dc9965ae80577a09aadafeeb53"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calls respective IPI handler based on the API_ID.  <a href="#ga1471a9dc9965ae80577a09aadafeeb53">More...</a><br/></td></tr>
<tr class="separator:ga1471a9dc9965ae80577a09aadafeeb53"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gab2f78b9aec19c60f8d29b4ba55f180a4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_128BIT_MAX_KEY_BLOCK_ROUNDS&#160;&#160;&#160;(2U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES 128-bit number of blocks. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="gad12e8fdc37fd38e9a10b3979b495e364"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_256BIT_MAX_KEY_BLOCK_ROUNDS&#160;&#160;&#160;(4U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES 256-bit number of blocks. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa26b61acf33b45fed961e0e3a59f7baa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_64BIT_BLOCK_SIZE&#160;&#160;&#160;(8U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES 64-bit block size in bytes. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>, and <a class="el" href="group__xsecure__keyunwrap__server__apis.html#gaf1df351e91ee42e7c281b2e676ffda7b">XSecure_KeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="ga9944c3af466f03239bab724adc5cf8f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_AAD_DISABLE&#160;&#160;&#160;(0x0U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables authentication of data pushed in AES engine. </p>

</div>
</div>
<a class="anchor" id="ga41242ae2169986d4a05c94e659561e51"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_AAD_ENABLE&#160;&#160;&#160;(0x1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables authentication of data pushed in AES engine. </p>

</div>
</div>
<a class="anchor" id="ga6ef6c422dedc24716a5cd91892304134"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_DEC_KEY_SRC_MASK&#160;&#160;&#160;(0x000000FFU)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES decrypt key source mask for KEK decryption. </p>

</div>
</div>
<a class="anchor" id="ga8adde1345ce8edcaec86ff8d9898af06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_DISABLE_KUP_IV_UPDATE&#160;&#160;&#160;(0x0U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables IV and Key save features for KUP. </p>

</div>
</div>
<a class="anchor" id="ga4824f991f48dd7050a69598367dfb093"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_DST_KEY_SRC_MASK&#160;&#160;&#160;(0x0000FF00U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES destination key source mask for KEK decryption. </p>

</div>
</div>
<a class="anchor" id="ga9c335ab77abaf46efb54cdd08a16c7d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_ECB_MODE_DIS&#160;&#160;&#160;(0U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES ECB Mode Enable. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga42ab2048d7363ba51f6d9c4e9c93d88e">XSecure_AesEcbCfg()</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga6422d39ce630dc928daba92a65da4c56">XSecure_AesEcbDecrypt()</a>, and <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="ga54f245411d6dc8248fde64c3727d0210"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_ECB_MODE_EN&#160;&#160;&#160;(1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES ECB Mode Enable. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga42ab2048d7363ba51f6d9c4e9c93d88e">XSecure_AesEcbCfg()</a>.</p>

</div>
</div>
<a class="anchor" id="ga1355e094199d737cb60c443a8128a825"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_ENABLE_KUP_IV_UPDATE&#160;&#160;&#160;(0x1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables IV and Key save features for KUP. </p>

</div>
</div>
<a class="anchor" id="ga4d5a472989742f1f1f53e87597e33b3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_KEY_SIZE_MASK&#160;&#160;&#160;(0xFFFF0000U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Key Size mask. </p>

</div>
</div>
<a class="anchor" id="ga1bceb3750312b5c32f292ad571f75683"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_KEY_WRAP_INIT_DEF_VAL&#160;&#160;&#160;(0xA6A6A6A6A6A6A6A6U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES init default value. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="ga7eec200e8b013181f73f91c773195844"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_AES_KEY_WRAP_MAX_ROUNDS&#160;&#160;&#160;(5U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES key wrap maximum rounds. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga4da9ead453ef1dbeebefeebb377eb94d">XSecure_AesKeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf7e4e23831da01fbb569d0bd5ec53edd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_KEK_DEC_ENABLE&#160;&#160;&#160;(0x1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Triggers decryption operation for black key. </p>

</div>
</div>
<a class="anchor" id="gafb041a8728c54e97cdc310326006af0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_PMCDMA_DEVICEID&#160;&#160;&#160;(PMCDMA_0_DEVICE_ID)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>AES destination key source mask for KEK decryption. </p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#gaa58a05547f6ae883c23823bf0f3bed7d">XSecure_AesInit()</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga55cd9d64e04cce6a57d729b67a5f0c47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used for selecting the Key size of AES Core. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga55cd9d64e04cce6a57d729b67a5f0c47a2e5b9343d2f9cc0e355b413d6a3848e3"></a>XSECURE_AES_KEY_SIZE_128</em>&nbsp;</td><td class="fielddoc">
<p>Key Length = 16 bytes = 128 bits. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga55cd9d64e04cce6a57d729b67a5f0c47afe748ecfca538040238b87ca1bd1dfde"></a>XSECURE_AES_KEY_SIZE_256</em>&nbsp;</td><td class="fielddoc">
<p>Key Length = 32 bytes = 256 bits. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga55cd9d64e04cce6a57d729b67a5f0c47a2e5b9343d2f9cc0e355b413d6a3848e3"></a>XSECURE_AES_KEY_SIZE_128</em>&nbsp;</td><td class="fielddoc">
<p>Key Length = 32 bytes = 256 bits. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga55cd9d64e04cce6a57d729b67a5f0c47afe748ecfca538040238b87ca1bd1dfde"></a>XSECURE_AES_KEY_SIZE_256</em>&nbsp;</td><td class="fielddoc">
<p>Key Length = 16 bytes = 128 bits. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gabf062a667c2c2204b6e15c1a5dc689dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesCfgKupKeyNIv </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets AES engine to update key and IV during decryption of secure header or footer of encrypted partition. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">Config</td><td>XSECURE_AES_ENABLE_KUP_IV_UPDATE to enable KUP and IV update, XSECURE_AES_DISABLE_KUP_IV_UPDATE to disable KUP and IV update</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful configuration</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Enable/disable the KUP and IV update as per the configuration provided </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga7ba70bdc53e1ee1cef9065218b53a624"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesDecryptData </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GcmTagAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function decrypts the size (length) number of bytes of the passed in InDataAddr (source) buffer and stores the decrypted data in the OutDataAddr (destination) buffer and verifies GcmTagAddr. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the encrypted data which needs to be decrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the decrypted to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be decrypted in bytes, whereas number of bytes provided should be multiples of 4 for Versal For Versal Net, byte aligned data is acceptable </td></tr>
    <tr><td class="paramname">GcmTagAddr</td><td>Address of a buffer which should contain GCM Tag</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful decryption and GCM tag verification</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_INVALID_MODE If input mode is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Update AES engine with encrypted data and get the decrypted data output</p>
<p>Verify GCM tag </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga7f1f786e7a3e95185c49a2f432b7c713"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesDecryptFinal </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GcmTagAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function verifies the GCM tag provided for the data decrypted till the point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">GcmTagAddr</td><td>Address of a buffer which should holds GCM Tag</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful GCM tag verification</li>
<li>XSECURE_AES_GCM_TAG_MISMATCH User provided GCM tag does not match calculated tag</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_INVALID_MODE If input mode is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Update AES engine with the GCM Tag data to verify the GCM Tag</p>
<p>Verify whether GCM Tag is matched or not </p>

</div>
</div>
<a class="anchor" id="ga807d06af255f6812989d18fe9e8c7cac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesDecryptInit </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>KeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>IvAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes the AES engine for decryption. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeySrc</td><td>Key Source for decryption of the data </td></tr>
    <tr><td class="paramname">KeySize</td><td>Size of the AES key to be used for decryption is<ul>
<li>XSECURE_AES_KEY_SIZE_128 for 128 bit key size</li>
<li>XSECURE_AES_KEY_SIZE_256 for 256 bit key size </li>
</ul>
</td></tr>
    <tr><td class="paramname">IvAddr</td><td>Address to the buffer holding IV</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful init</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XSECURE_AES_ZERO_PUF_KEY_NOT_ALLOWED If keysrc is puf and puf key is zero</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ga1c217f08493d7335e61a96faad16430c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesDecryptUpdate </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>IsLastChunk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to update the AES engine for decryption with provided data and stores the decrypted data at specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the encrypted data which needs to be decrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the decrypted to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be decrypted in bytes, whereas number of bytes shall be aligned as below for Versal<ul>
<li>16 byte aligned when it is not the last chunk</li>
<li>4 byte aligned when the data is the last chunk For Versal Net, byte aligned data is accepted </li>
</ul>
</td></tr>
    <tr><td class="paramname">IsLastChunk</td><td>If this is the last update of data to be decrypted, this parameter should be set to TRUE otherwise FALSE</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful decryption of the data</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_UNALIGNED_SIZE_ERROR If input IsLastChunk is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ga443eef9b38401bfcbafa33a4eec6859c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesDpaCmDecryptData </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>AesInstance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u32 *&#160;</td>
          <td class="paramname"><em>KeyPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u32 *&#160;</td>
          <td class="paramname"><em>DataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>OutputPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function updates data and key to the AES core in split mode with DPACM enabled. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AesInstance</td><td>InstancePtr Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeyPtr</td><td>Key Pointer </td></tr>
    <tr><td class="paramname">DataPtr</td><td>Data Pointer </td></tr>
    <tr><td class="paramname">OutputPtr</td><td>Output where the decrypted data to be stored</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success</li>
<li>XSECURE_AESKAT_INVALID_PARAM Invalid Argument</li>
<li>XSECURE_AESDPACM_KAT_WRITE_KEY_FAILED_ERROR Error when AESDPACM key write fails</li>
<li>XSECURE_AESDPACM_KAT_KEYLOAD_FAILED_ERROR Error when AESDPACM key load fails</li>
<li>XSECURE_AESDPACM_SSS_CFG_FAILED_ERROR Error when AESDPACM sss configuration fails</li>
<li>XSECURE_AESDPACM_KAT_FAILED_ERROR Error when AESDPACM KAT fails</li>
<li>XST_FAILURE On failure</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function is used during DPACM KAT where key and data are updated in split mode with DPACM enabled </dd></dl>
<p>Configure AES for Encryption</p>
<p>Configure AES engine in split mode to update data and key to aes core</p>
<p>Write Key mask value</p>
<p>Write AES key</p>
<p>Start the message.</p>
<p>Configure the PMC DMA Tx/Rx for the incoming Block. </p>

<p>References <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574af9af68710576ff8ec15632d615f8b2eb">XSECURE_AESKAT_INVALID_PARAM</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__kat__server__apis.html#gaed0ff5bd2a251e178b5c985cabbd5814">XSecure_AesDecryptCmKat()</a>.</p>

</div>
</div>
<a class="anchor" id="ga42ab2048d7363ba51f6d9c4e9c93d88e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEcbCfg </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>EcbModeFlag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function sets AES ECB mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">EcbModeFlag</td><td>Flag to enable/disable ECB mode</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On Success</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR On state mismatch </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__aes__server__apis.html#ga9c335ab77abaf46efb54cdd08a16c7d6">XSECURE_AES_ECB_MODE_DIS</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga54f245411d6dc8248fde64c3727d0210">XSECURE_AES_ECB_MODE_EN</a>, <a class="el" href="group__xsecure__helper__server__apis.html#ga48aafede9c9ae68ab7f9e4b6b49d6be2">XSECURE_AES_ECB_OFFSET</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>, and <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574acc47a7e8e079ea3b61729bb366e5b8e2">XSECURE_AES_STATE_MISMATCH_ERROR</a>.</p>

</div>
</div>
<a class="anchor" id="ga6422d39ce630dc928daba92a65da4c56"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEcbDecrypt </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>KeyAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function writes AES key into XSECURE_AES_USER_KEY_7 and decrypts the data in ECB mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeyAddr</td><td>Address of the key to be programmed in XSECURE_AES_USER_KEY_7 </td></tr>
    <tr><td class="paramname">KeySize</td><td>Size of the AES key to be used for decryption is<ul>
<li>XSECURE_AES_KEY_SIZE_128 for 128 bit key size</li>
<li>XSECURE_AES_KEY_SIZE_256 for 256 bit key size </li>
</ul>
</td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the encrypted data which needs to be decrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the decrypted data to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be decrypted in bytes, whereas number of bytes shall be aligned as below<ul>
<li>16 byte aligned when it is not the last chunk</li>
<li>4 byte aligned when the data is the last chunk</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On Success</li>
<li>XST_FAILURE On Failure </li>
</ul>
</dd></dl>

<p>References <a class="el" href="xsecure__aes__core__hw_8h.html#ac14b72a31d6841f368eb38d4104531e9">XSECURE_AES_DATA_SWAP_OFFSET</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga9c335ab77abaf46efb54cdd08a16c7d6">XSECURE_AES_ECB_MODE_DIS</a>, <a class="el" href="group__xsecure__helper__server__apis.html#ga48aafede9c9ae68ab7f9e4b6b49d6be2">XSECURE_AES_ECB_OFFSET</a>, <a class="el" href="xsecure__aes__core__hw_8h.html#aafd28b72f9ee5ce4fa83e3e27d3410d8">XSECURE_AES_SOFT_RST_OFFSET</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262cab5c84ff4a7f15af959065b2e66aa088f">XSECURE_AES_USER_KEY_7</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga3150fb8656509ac0217c44c9609776cc">XSecure_AesDecryptUpdate()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaa3c4b19232e0c5fa8cf14d69410e31e7">XSecure_AesKeyZero()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga056f80ac76299a3ed41102b9f21237e7">XSecure_AesWriteKey()</a>, <a class="el" href="group__xsecure__helper__server__apis.html#gaabad70194ca8d8f8a4ed207eb2bc4af9">XSECURE_DISABLE_BYTE_SWAP</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga7d9385d1d7121998a9be90e90d3a8f7b">XSecure_SetReset()</a>.</p>

</div>
</div>
<a class="anchor" id="gad76ddbc6c3c0badc06b26ebae71c38bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEncryptData </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GcmTagAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function encrypts size (length) number of bytes of the passed in InDataAddr (source) buffer and stores the encrypted data along with its associated 16 byte tag in the OutDataAddr (destination) buffer and GcmTagAddr (buffer) respectively. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the data which needs to be encrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the encrypted data to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be encrypted in bytes, whereas number of bytes provided should be multiples of 4 for Versal For Versal Net, byte aligned data is acceptable </td></tr>
    <tr><td class="paramname">GcmTagAddr</td><td>Address to the buffer of GCM tag size, where the API updates GCM tag</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful encryption</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_INVALID_MODE If input mode is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Validate the input arguments</p>
<p>Update the data to AES engine</p>
<p>Get the GCM Tag </p>

</div>
</div>
<a class="anchor" id="gae22634123b8e2b07d0fd2959ccb99709"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEncryptFinal </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GcmTagAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function updates the GCM tag for the encrypted data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">GcmTagAddr</td><td>Address to the buffer of GCM tag size, where the API updates GCM tag</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful GCM tag updation</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_INVALID_MODE If input mode is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga90198a57e2ac802241f43067c6644ae0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEncryptInit </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>KeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>IvAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes the AES engine for encryption. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeySrc</td><td>Key Source for encryption </td></tr>
    <tr><td class="paramname">KeySize</td><td>Size of the AES key to be used for encryption is<ul>
<li>XSECURE_AES_KEY_SIZE_128 for 128 bit key size</li>
<li>XSECURE_AES_KEY_SIZE_256 for 256 bit key size </li>
</ul>
</td></tr>
    <tr><td class="paramname">IvAddr</td><td>Address to the buffer holding IV</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful initialization</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XSECURE_AES_ZERO_PUF_KEY_NOT_ALLOWED If keysrc is puf and puf key is zero</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="gafc1c2624b3827e83af7c24b2906bb7db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesEncryptUpdate </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>InDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>IsLastChunk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to update the AES engine for encryption with provided data and stores the decrypted data at specified address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">InDataAddr</td><td>Address of the encrypted data which needs to be encrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the encrypted data to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be decrypted in bytes, whereas number of bytes shall be aligned as below for Versal<ul>
<li>16 byte aligned when it is not the last chunk</li>
<li>4 byte aligned when the data is the last chunk For Versal Net, byte aligned data is acceptable </li>
</ul>
</td></tr>
    <tr><td class="paramname">IsLastChunk</td><td>If this is the last update of data to be encrypted, this parameter should be set to TRUE otherwise FALSE</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful encryption of the data</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_UNALIGNED_SIZE_ERROR If input IsLastChunk is invalid</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ga62c2d78201f34ec93974d43035f71794"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesGetNxtBlkLen </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function gives the AES next block length after decryption of PDI block. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">Size</td><td>Pointer to a 32 bit variable where next block length will be updated</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga8adf6430b44ff6b7acf7df53a34df9b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesGmacCfg </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IsGmacEn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function enables or disables the GMAC configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">IsGmacEn</td><td>User choice to enable/disable GMAC</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful configuration</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR On state mismatch</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>To generate GMAC on AAD data, this API must be called with IsGmacEn set to TRUE just before the last AAD update. After the last AAD update XSecure_AesEncryptFinal or XSecure_AesDecryptFinal must be called to generate or validate the GMAC tag. </dd></dl>
<p>Enable/disable GMAC configuration </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="gaa58a05547f6ae883c23823bf0f3bed7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function handler calls XSecure_AesInitialize Server API. </p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the initialization is successful</li>
<li>XST_FAILURE If PMCDMA instance is NULL. </li>
</ul>
</dd></dl>
<p>Initialize the Aes driver so that it's ready to use </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#ga2768b0d967bc577d2721682881592bb7">XSecure_AesInitialize()</a>, <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>, and <a class="el" href="group__xsecure__aes__server__apis.html#gafb041a8728c54e97cdc310326006af0a">XSECURE_PMCDMA_DEVICEID</a>.</p>

</div>
</div>
<a class="anchor" id="ga13b13c404de0b6f918193c4b63198acc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesInitialize </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XPmcDma *&#160;</td>
          <td class="paramname"><em>PmcDmaPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes the AES instance pointer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">PmcDmaPtr</td><td>Pointer to the XPmcDma instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If initialization was successful</li>
<li>XSECURE_AES_INVALID_PARAM For invalid parameter</li>
<li>XST_FAILURE On failure</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>All the inputs are accepted in little endian format, but AES engine accepts the data in big endianness, this will be taken care while passing data to AES engine </dd></dl>
<p>Initialize the instance</p>
<p>Initialize SSS Instance </p>

</div>
</div>
<a class="anchor" id="ga3d0efd64b0f7ebbdc1b3be80aa10a840"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesIpiHandler </td>
          <td>(</td>
          <td class="paramtype">XPlmi_Cmd *&#160;</td>
          <td class="paramname"><em>Cmd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function calls respective IPI handler based on the API_ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Cmd</td><td>is pointer to the command structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the handler execution is successful</li>
<li>XST_INVALID_PARAM On invalid parameter</li>
<li>XST_DEVICE_BUSY If IPI channel is busy </li>
</ul>
</dd></dl>
<p>Handle the present command based on AES core status</p>
<p>Call the respective API handler according to API ID</p>
<ul>
<li><a class="el" href="group__xsecure__aes__server__apis.html#gaa58a05547f6ae883c23823bf0f3bed7d">XSecure_AesInit</a></li>
<li>XSecure_AesOperationInit</li>
<li>XSecure_AesAadUpdate</li>
<li>XSecure_AesEncUpdate</li>
<li>XSecure_AesEncFinal</li>
<li>XSecure_AesDecUpdate</li>
<li>XSecure_AesDecFinal</li>
<li><a class="el" href="group__xsecure__aes__server__apis.html#ga6b5414d0bffdebf14b418d2d05135faa">XSecure_AesKeyZeroize</a></li>
<li><a class="el" href="group__xsecure__aes__server__apis.html#gaa7f952e1399a6303328d40d8e251460c">XSecure_AesKeyWrite</a></li>
<li>XSecure_AesDecryptKek</li>
<li>XSecure_AesSetDpaCmConfig</li>
<li><a class="el" href="group__xsecure__aes__server__apis.html#gabe78befff27daa757aecc436204e33af">XSecure_AesPerformOperation</a> </li>
</ul>

<p>References <a class="el" href="group__xsecure__aes__server__apis.html#gaa7f952e1399a6303328d40d8e251460c">XSecure_AesKeyWrite()</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga6b5414d0bffdebf14b418d2d05135faa">XSecure_AesKeyZeroize()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga1be5abccbec8cce45963a979c72828e1">XSecure_AesPerformOperation()</a>, <a class="el" href="group__xsecure__common__apis.html#ga2f4a1a99096821d10b0719a4ded431d5">XSECURE_API</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca18c3a8922609fb6afceea6a068f2baf2">XSECURE_API_AES_DECRYPT_FINAL</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca45d225b8053c332f20fbdb468b21e436">XSECURE_API_AES_DECRYPT_UPDATE</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca725ee7839a0af61500722276cdf5fe65">XSECURE_API_AES_ENCRYPT_FINAL</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acad8f88bc04c0bf662cf12324269d81ff2">XSECURE_API_AES_ENCRYPT_UPDATE</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca02f7a9f0b902d3783d8d7508ef194477">XSECURE_API_AES_INIT</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acad5d672c120603105e990a4a321938cb1">XSECURE_API_AES_KEK_DECRYPT</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca16f54fa4047812544017288d499c2ddb">XSECURE_API_AES_KEY_ZERO</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acabf47c27ddc6dcbdce2694869cea603aa">XSECURE_API_AES_OP_INIT</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acaffa8a13644e65d5e7776e9198365c5cd">XSECURE_API_AES_PERFORM_OPERATION</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acadc717b63c9b0d4b8f7b3a54d932435de">XSECURE_API_AES_SET_DPA_CM</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca6febb16fb9387879f8ffb7c7a51e7064">XSECURE_API_AES_UPDATE_AAD</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36acab8155ff5779538f3fa2f7b8b2c3c251c">XSECURE_API_AES_WRITE_KEY</a>, <a class="el" href="group__xsecure__common__apis.html#gaa2f27ea2d621bbdeda76bad8109eb77b">XSECURE_API_ID_MASK</a>, <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>, <a class="el" href="group__xsecure__generic__server__apis.html#ga888b5fb720349f4766f1a6b45f318520">XSecure_IpiEventHandling()</a>, <a class="el" href="group__xsecure__generic__server__apis.html#gace2c73e5d80dd85a226551b02e396cc0">XSecure_MakeResFree()</a>, and <a class="el" href="group__xsecure__common__apis.html#ga693c54d224d1fa8ca68b215023b2b359">XSecure_Printf</a>.</p>

</div>
</div>
<a class="anchor" id="gad9ad11c4f580a91a007391ef94cad3fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesKekDecrypt </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>DecKeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>DstKeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>IvAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function decrypts the KEK/obfuscated key which is found encrypted in boot header/eFUSE/BBRAM. </p>
<p>It then places it in the specified red key register.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">DecKeySrc</td><td>Select key source which holds KEK and needs to be decrypted </td></tr>
    <tr><td class="paramname">DstKeySrc</td><td>Select the key in which decrypted red key should be updated </td></tr>
    <tr><td class="paramname">IvAddr</td><td>Address of IV holding buffer for decryption of the key </td></tr>
    <tr><td class="paramname">KeySize</td><td>A variable of type XSecure_AesKeySize, which specifies the size of the key to be<ul>
<li>XSECURE_AES_KEY_SIZE_128 for 128 bit key size</li>
<li>XSECURE_AES_KEY_SIZE_256 for 256 bit key size</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful key decryption</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch occurs</li>
<li>XST_FAILURE If timeout has occurred </li>
</ul>
</dd></dl>
<p>Load AES key to registers from PUF key</p>
<p>Configure the AES engine for Key decryption and starts operation</p>
<p>Trigger key decryption operation</p>
<p>Wait for AES Decryption completion. </p>

</div>
</div>
<a class="anchor" id="ga4da9ead453ef1dbeebefeebb377eb94d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesKeyUnwrap </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>EphAesKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>AesWrapKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>OutDataAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function unwraps the given AES wrapped key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">EphAesKey</td><td>Address of the key to be programmed in XSECURE_AES_USER_KEY_7 </td></tr>
    <tr><td class="paramname">KeySize</td><td>Size of the AES key to be used for decryption is XSECURE_AES_KEY_SIZE_128 for 128 bit key size XSECURE_AES_KEY_SIZE_256 for 256 bit key size </td></tr>
    <tr><td class="paramname">AesWrapKey</td><td>Address of the wrapped key which needs to be decrypted </td></tr>
    <tr><td class="paramname">OutDataAddr</td><td>Address of output buffer where the decrypted data to be updated </td></tr>
    <tr><td class="paramname">Size</td><td>Size of data to be decrypted in bytes, whereas number of bytes shall be aligned as below<ul>
<li>16 byte aligned when it is not the last chunk</li>
<li>4 byte aligned when the data is the last chunk</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success.</li>
<li>XSECURE_ERR_AES_KEY_SIZE_NOT_SUPPORTED If AES key size is invalid.</li>
<li>XSECURE_ERR_AES_KEY_UNWRAP_FAILED_ERROR If key unwrap is failed.</li>
<li>XST_FAILURE On failure. </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__aes__server__apis.html#gab2f78b9aec19c60f8d29b4ba55f180a4">XSECURE_AES_128BIT_MAX_KEY_BLOCK_ROUNDS</a>, <a class="el" href="group__xsecure__aes__server__apis.html#gad12e8fdc37fd38e9a10b3979b495e364">XSECURE_AES_256BIT_MAX_KEY_BLOCK_ROUNDS</a>, <a class="el" href="group__xsecure__aes__server__apis.html#gaa26b61acf33b45fed961e0e3a59f7baa">XSECURE_AES_64BIT_BLOCK_SIZE</a>, <a class="el" href="xsecure__aes__core__hw_8h.html#ac14b72a31d6841f368eb38d4104531e9">XSECURE_AES_DATA_SWAP_OFFSET</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga9c335ab77abaf46efb54cdd08a16c7d6">XSECURE_AES_ECB_MODE_DIS</a>, <a class="el" href="group__xsecure__helper__server__apis.html#ga48aafede9c9ae68ab7f9e4b6b49d6be2">XSECURE_AES_ECB_OFFSET</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga1bceb3750312b5c32f292ad571f75683">XSECURE_AES_KEY_WRAP_INIT_DEF_VAL</a>, <a class="el" href="group__xsecure__aes__server__apis.html#ga7eec200e8b013181f73f91c773195844">XSECURE_AES_KEY_WRAP_MAX_ROUNDS</a>, <a class="el" href="xsecure__aes__core__hw_8h.html#aafd28b72f9ee5ce4fa83e3e27d3410d8">XSECURE_AES_SOFT_RST_OFFSET</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262cab5c84ff4a7f15af959065b2e66aa088f">XSECURE_AES_USER_KEY_7</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga3150fb8656509ac0217c44c9609776cc">XSecure_AesDecryptUpdate()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaa3c4b19232e0c5fa8cf14d69410e31e7">XSecure_AesKeyZero()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga056f80ac76299a3ed41102b9f21237e7">XSecure_AesWriteKey()</a>, <a class="el" href="group__xsecure__helper__server__apis.html#gaabad70194ca8d8f8a4ed207eb2bc4af9">XSECURE_DISABLE_BYTE_SWAP</a>, <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574af10eedc347b4d363632e86345fcde6c5">XSECURE_ERR_AES_KEY_SIZE_NOT_SUPPORTED</a>, <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574af31181814d92e3cc60868a6cc99cd48c">XSECURE_ERR_AES_KEY_UNWRAP_FAILED_ERROR</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga7d9385d1d7121998a9be90e90d3a8f7b">XSecure_SetReset()</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__keyunwrap__server__apis.html#gaf1df351e91ee42e7c281b2e676ffda7b">XSecure_KeyUnwrap()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa7f952e1399a6303328d40d8e251460c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesKeyWrite </td>
          <td>(</td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>KeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>KeyAddrLow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>KeyAddrHigh</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function handler calls XSecure_AesWriteKey server API. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">KeySize</td><td>Size of the key to specify 128/256 bit key </td></tr>
    <tr><td class="paramname">KeySrc</td><td>KeySrc to which key has to be written </td></tr>
    <tr><td class="paramname">KeyAddrLow</td><td>Lower 32 bit address of the Key </td></tr>
    <tr><td class="paramname">KeyAddrHigh</td><td>Higher 32 bit address of the Key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the key write is successful</li>
<li>XSECURE_AES_INVALID_PARAM For invalid parameter</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Writes the key provided into the specified AES key registers </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262caa6ffd70735b44d0b80f75f344beca566">XSECURE_AES_BH_KEY</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262cafc412e409ab2538a1971c54f917cbbf1">XSECURE_AES_BH_RED_KEY</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga056f80ac76299a3ed41102b9f21237e7">XSecure_AesWriteKey()</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga3d0efd64b0f7ebbdc1b3be80aa10a840">XSecure_AesIpiHandler()</a>.</p>

</div>
</div>
<a class="anchor" id="ga951b41e7a8b8a9ce252cdd640f69a8dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesKeyZero </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>KeySrc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function zeroizes the selected AES key storage register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeySrc</td><td>Select the key source which needs to be zeroized</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS When key zeroization is success</li>
<li>XST_INVALID_PARAM if key source is invalid</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XSECURE_AES_KEY_CLEAR_ERROR AES key clear error </li>
</ul>
</dd></dl>
<p>Zeroize the specified key source </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga6b5414d0bffdebf14b418d2d05135faa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesKeyZeroize </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>KeySrc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function handler calls XSecure_AesKeyZero server API. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">KeySrc</td><td>Key source to be zeroized</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the key zeroize is successful</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Validate key source to allow clearing of keysources other than device keys </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262cac1b2dfac9fa33633ef8a335b121716ea">XSECURE_AES_EXPANDED_KEYS</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>, <a class="el" href="xsecure_8h.html#ac1d450a8bf29adb33a6855a2d495d00e">XSECURE_AES_KUP_KEY</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262ca78b79c2fdd517f30458ffbc9364abbdc">XSECURE_AES_PUF_KEY</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262ca2ed303c437d0f865f4c4af8c6ff8fd82">XSECURE_AES_USER_KEY_0</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gga3be7525f93a2e54baa60c3b1a9df262cab5c84ff4a7f15af959065b2e66aa088f">XSECURE_AES_USER_KEY_7</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaa3c4b19232e0c5fa8cf14d69410e31e7">XSecure_AesKeyZero()</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__aes__server__apis.html#ga3d0efd64b0f7ebbdc1b3be80aa10a840">XSecure_AesIpiHandler()</a>.</p>

</div>
</div>
<a class="anchor" id="gabe78befff27daa757aecc436204e33af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesPerformOperation </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>SrcAddrLow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>SrcAddrHigh</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function handler calls XSecure_AesPerformOperation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SrcAddrLow</td><td>Lower 32 bit address of the <a class="el" href="struct_x_secure___aes_data_block_params.html" title="Structure for input parameters for AES Encryption and Decryption of single block of data...">XSecure_AesDataBlockParams</a> structure. </td></tr>
    <tr><td class="paramname">SrcAddrHigh</td><td>Higher 32 bit address of the <a class="el" href="struct_x_secure___aes_data_block_params.html" title="Structure for input parameters for AES Encryption and Decryption of single block of data...">XSecure_AesDataBlockParams</a> structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the initialization is successful</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Validate key source and initialise AES to encryption/decryption</p>
<p>Update AAD</p>
<p>Based on user's choice GCM/GMAC encryption/decryption is performed </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#ga074dbaf57b453f094f14c6b6c7aca964">XSecure_AesDecryptData()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga49114523757f3b39daf51876ba899e51">XSecure_AesDecryptFinal()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#gaa65c921632e25a29b33b883d85cf9058">XSecure_AesEncryptData()</a>, <a class="el" href="group__xsecure__aes__client__apis.html#ga982cb284b765c652355d9f942798211b">XSecure_AesEncryptFinal()</a>, <a class="el" href="group__xsecure__helper__server__apis.html#ggadcb99879df57dfcbb96293bd161933beae6aac4a684081de8c6c970ef364fd091">XSECURE_ENCRYPT</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf7009ee23d2f452bbcad0b44a7e162bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesSetDpaCm </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>DpaCmCfg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function enables or disables DPA counter measures in AES engine based on user input. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">DpaCmCfg</td><td>User choice to enable/disable DPA CM<ul>
<li>TRUE - to enable AES DPA counter measure (Default setting)</li>
<li>FALSE - to disable AES DPA counter measure</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If configuration is success</li>
<li>XSECURE_AES_INVALID_PARAM For invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XSECURE_AES_DPA_CM_NOT_SUPPORTED If DPA CM is disabled on chip (Enabling/Disabling in AES engine does not impact functionality)</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Set DPA counter measures as per the user input </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga1d71c3a289fb13edf97bdd3ac8945e39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesUpdateAad </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>AadAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>AadSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to update the AES engine with Additional Authenticated Data(AAD). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">AadAddr</td><td>Address of the additional authenticated data </td></tr>
    <tr><td class="paramname">AadSize</td><td>Size of additional authenticated data in bytes, whereas number of bytes provided should be quad-word aligned(multiples of 16 bytes) for Versal For Versal Net, byte aligned data is accepted</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful update of AAD</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch occurs</li>
<li>XST_FAILURE On failure to update AAD</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The API must be called after <a class="el" href="group__xsecure__aes__client__apis.html#ga23f9b2bfaf978518d82c19d8331c9cb8" title="This function sends IPI request to EncryptInit the AES engine. ">XSecure_AesEncryptInit()</a> or <a class="el" href="group__xsecure__aes__client__apis.html#gacea2fc49243f66d0b440a95d1bd6170f" title="This function sends IPI request to DecryptInit the AES engine. ">XSecure_AesDecryptInit()</a> </dd></dl>
<p>Enable AAD by writing to the register</p>
<p>Configure DMA and transfer AAD to AES engine </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="gaeca8eaab9e67f642a1196aa2bc3e9492"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesUpdateAadAndValidate </td>
          <td>(</td>
          <td class="paramtype">XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>AadAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>AadSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>GcmTagAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to update the AES engine with Additional Authenticated Data(AAD) and validate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">AadAddr</td><td>Address of the additional authenticated data </td></tr>
    <tr><td class="paramname">AadSize</td><td>Size of additional authenticated data in bytes, whereas number of bytes provided should be multiples of 4 </td></tr>
    <tr><td class="paramname">GcmTagAddr</td><td>GCM tag of the additional authenticated data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS AAD updation and validation is success</li>
<li>XSECURE_AES_INVALID_PARAM On invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR On state mismatch</li>
<li>XSECURE_AES_GCM_TAG_MISMATCH User provided GCM tag does not match calculated tag</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga23c59319450ef4fac730de6019d36a5a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_AesWriteKey </td>
          <td>(</td>
          <td class="paramtype">const XSecure_Aes *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__common__apis.html#gac18d312794ff692037e63183f8f9343f">XSecure_AesKeySrc</a>&#160;</td>
          <td class="paramname"><em>KeySrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xsecure__aes__client__apis.html#ga55cd9d64e04cce6a57d729b67a5f0c47">XSecure_AesKeySize</a>&#160;</td>
          <td class="paramname"><em>KeySize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>KeyAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function writes the key provided into the specified AES key registers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>Pointer to the XSecure_Aes instance </td></tr>
    <tr><td class="paramname">KeySrc</td><td>Key Source to be selected to which provided key should be updated by<ul>
<li>XSECURE_AES_USER_KEY_0</li>
<li>XSECURE_AES_USER_KEY_1</li>
<li>XSECURE_AES_USER_KEY_2</li>
<li>XSECURE_AES_USER_KEY_3</li>
<li>XSECURE_AES_USER_KEY_4</li>
<li>XSECURE_AES_USER_KEY_5</li>
<li>XSECURE_AES_USER_KEY_6</li>
<li>XSECURE_AES_USER_KEY_7</li>
<li>XSECURE_AES_BH_KEY </li>
</ul>
</td></tr>
    <tr><td class="paramname">KeySize</td><td>A variable of type XSecure_AesKeySize, which holds the size of the input key to be written by<ul>
<li>XSECURE_AES_KEY_SIZE_128 for 128 bit key size</li>
<li>XSECURE_AES_KEY_SIZE_256 for 256 bit key size </li>
</ul>
</td></tr>
    <tr><td class="paramname">KeyAddr</td><td>Address of a buffer which should contain the key to be written</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful key written on AES registers</li>
<li>XSECURE_AES_INVALID_PARAM For invalid parameter</li>
<li>XSECURE_AES_STATE_MISMATCH_ERROR If State mismatch is occurred</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>
<p>Write key into the specified AES key registers </p>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#gaf7eae7e456a1d11d550afb26e22ea199">XSECURE_AES_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="ga5fcf401d8b1ccbe22d58cad54cb90178"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_CfgSssAes </td>
          <td>(</td>
          <td class="paramtype">XPmcDma *&#160;</td>
          <td class="paramname"><em>DmaPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const XSecure_Sss *&#160;</td>
          <td class="paramname"><em>SssInstance</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function configures SSS to AES engine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DmaPtr</td><td>Pointer to the DMA instance </td></tr>
    <tr><td class="paramname">SssInstance</td><td>Pointer to SSS instance</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On successful configuration</li>
<li>XST_FAILURE On failure </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__xsecure__helper__server__apis.html#ggab4e2a6423dfb2e446d7dc1ee602c6ea5ad99985ebb6cf4318c4ff571557bc6b09">XSECURE_SSS_DMA0</a>, and <a class="el" href="group__xsecure__helper__server__apis.html#ggab4e2a6423dfb2e446d7dc1ee602c6ea5aa2a6923f1a527c87fb745b94a1004ebe">XSECURE_SSS_DMA1</a>.</p>

</div>
</div>
<a class="anchor" id="ga1471a9dc9965ae80577a09aadafeeb53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_PlatAesIpiHandler </td>
          <td>(</td>
          <td class="paramtype">XPlmi_Cmd *&#160;</td>
          <td class="paramname"><em>Cmd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function calls respective IPI handler based on the API_ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Cmd</td><td>is pointer to the command structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS If the handler execution is successful.</li>
<li>XST_INVALID_PARAM If input parameter is invalid.</li>
<li>XST_FAILURE If there is a failure. </li>
</ul>
</dd></dl>
<p>Handle the present command based on AES core status</p>
<ul>
<li><a class="el" href="group__xsecure__aes__client__apis.html#ga92901f6856f8e7ea38caac86fb44e10b">XSecure_AesPerformOperationAndZeroizeKey</a> </li>
</ul>

<p>References <a class="el" href="group__xsecure__aes__client__apis.html#ga92901f6856f8e7ea38caac86fb44e10b">XSecure_AesPerformOperationAndZeroizeKey()</a>, <a class="el" href="group__xsecure__common__apis.html#ga2f4a1a99096821d10b0719a4ded431d5">XSECURE_API</a>, <a class="el" href="group__xsecure__common__apis.html#gga48921cbba3a5713caf7d975bedbe36aca5dc57e832b3e25778fdd795e7fe19300">XSECURE_API_AES_PERFORM_OPERATION_AND_ZEROIZE_KEY</a>, <a class="el" href="group__xsecure__common__apis.html#gaa2f27ea2d621bbdeda76bad8109eb77b">XSECURE_API_ID_MASK</a>, <a class="el" href="group__xsecure__generic__server__apis.html#ga11d8bbf7423a10f98cbcfd4796ea6d6a">XSecure_GetAesInstance()</a>, <a class="el" href="group__xsecure__generic__server__apis.html#ga888b5fb720349f4766f1a6b45f318520">XSecure_IpiEventHandling()</a>, <a class="el" href="group__xsecure__generic__server__apis.html#gace2c73e5d80dd85a226551b02e396cc0">XSecure_MakeResFree()</a>, and <a class="el" href="group__xsecure__common__apis.html#ga693c54d224d1fa8ca68b215023b2b359">XSecure_Printf</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
